package com.shoppingmall.fragment;

import android.view.View;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.zyh.toolslib.base.BaseFragment;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.shoppingmall.R;
import com.shoppingmall.activity.home.SearchResultActivity;
import com.shoppingmall.widget.RecycleGridDivider;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;


/**
 * liangwanbo
 */

public class SearchResultShopFragment extends BaseFragment implements SearchResultActivity.OnModifyListener {

    @BindView(R.id.rv_searchresult_list)
    RecyclerView rvSearchresultList;
    @BindView(R.id.smart_refresh)
    SmartRefreshLayout smartRefresh;
    private BaseQuickAdapter<String, BaseViewHolder> mAdapter;

    @Override
    protected void initView(View rootView) {

    }

    @Override
    protected void initData() {
        List<String> list = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            list.add("");
        }
        mAdapter=new BaseQuickAdapter<String, BaseViewHolder>(R.layout.item_searchresult_shop,list) {
            @Override
            protected void convert(@NonNull BaseViewHolder baseViewHolder, String s) {

            }
        };

        rvSearchresultList.setLayoutManager(new LinearLayoutManager(getActivity()));
        rvSearchresultList.addItemDecoration(new RecycleGridDivider());
        rvSearchresultList.setAdapter(mAdapter);

    }

    @Override
    protected int initLayout() {
        return R.layout.fragment_searchresult_shop;
    }

    @Override
    public void modify(String type) {

    }
}
